﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ApiBetaSeries.Version
{
    [AttributeUsage(AttributeTargets.Method)]
    internal class ApiMethod : System.Attribute
    {
        private List<string> m_url;
        private bool m_code;
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="url">url of the method on the api</param>
        public ApiMethod(bool code, params string[] url)
        {
            m_url = new List<string>();
            m_url.AddRange(url.ToList());
            m_code = code;
        }

        /// <summary>
        /// Url of the method used by the api
        /// </summary>
        public List<string> Url
        {
            get { return m_url; }
        }

        /// <summary>
        /// If the method contains proper code of the api
        /// </summary>
        public bool Code
        {
            get { return m_code; }
        }
    }
}
